home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-ietf-avt-rtp-02.txt < prev    next >
Text File  |  1993-07-30  |  77KB  |  1,623 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Internet Engineering Task Force                     Audio-Video Transport WG
  8. INTERNET-DRAFT                                      H. Schulzrinne/S. Casner
  9.                                                                     AT&T/ISI
  10.                                                                July 30, 1993
  11.                                                           Expires:  10/01/93
  12.  
  13.  
  14.                     RTP: A Real-Time Transport Protocol
  15.  
  16.  
  17.  
  18. Status of this Memo
  19.  
  20.  
  21. This document is an Internet Draft.   Internet Drafts are working  documents
  22. of the Internet Engineering  Task Force (IETF), its  Areas, and its  Working
  23. Groups.   Note that other  groups may also  distribute working documents  as
  24. Internet Drafts.
  25.  
  26. Internet Drafts  are draft  documents valid  for a  maximum of  six  months.
  27. Internet Drafts may be  updated, replaced, or  obsoleted by other  documents
  28. at any time.   It  is not appropriate  to use Internet  Drafts as  reference
  29. material or to  cite them other  than as  a ``working draft''  or ``work  in
  30. progress.''
  31.  
  32. Please check  the I-D  abstract  listing contained  in each  Internet  Draft
  33. directory to learn the current status of this or any other Internet Draft.
  34.  
  35. Distribution of this document is unlimited.
  36.  
  37.  
  38.                                   Abstract
  39.  
  40.  
  41.      This   draft  describes  a  real-time   transport  protocol  (RTP)
  42.     suitable  for the  network  transport of  real-time  data, such  as
  43.     audio,  video or  simulation data  for both  multicast  and unicast
  44.     transport  services.     The   data  transport  is  enhanced  by  a
  45.     control protocol  (RTCP)  designed to  provide minimal  control and
  46.     identification  functionality particularly  in multicast  networks.
  47.     RTP  and RTCP  are designed  to  be independent  of  the underlying
  48.     transport and  network layers.   The  protocol supports the  use of
  49.     RTP-level translators and bridges.   Within multicast associations,
  50.     sites can direct control messages to individual sites.
  51.  
  52.  
  53. This specification is a product  of the Audio-Video Transport working  group
  54. within the Internet  Engineering Task  Force.   Comments  are solicited  and
  55. should be addressed to the  working group's mailing list at  rem-conf@es.net
  56. and/or the authors.
  57.  
  58.  
  59. INTERNET-DRAFT                       RTP                       July 30, 1993
  60.  
  61. Contents
  62.  
  63.  
  64. 1 Introduction                                                             2
  65.  
  66.  
  67. 2 Protocol Conventions                                                     3
  68.  
  69. 3 Real-time Data Transfer Protocol -- RTP                                  4
  70.  
  71.   3.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
  72.  
  73.   3.2 RTP Fixed Header Fields . . . . . . . . . . . . . . . . . . . . . . 6
  74.  
  75.   3.3 The RTP Options . . . . . . . . . . . . . . . . . . . . . . . . . . 8
  76.  
  77.   3.4 Reverse-Path Option . . . . . . . . . . . . . . . . . . . . . . . . 9
  78.  
  79.   3.5 Security Options  . . . . . . . . . . . . . . . . . . . . . . . . . 11
  80.  
  81.   3.6 The Use of the Security Options . . . . . . . . . . . . . . . . . . 15
  82.  
  83.  
  84. 4 Real Time Control Protocol --- RTCP                                     17
  85.  
  86. 5 Security Considerations                                                 22
  87.  
  88.  
  89. 6 RTP over network and transport protocols                                23
  90.  
  91.   6.1 Defaults  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
  92.  
  93.   6.2 ST-II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
  94.  
  95.  
  96. A Implementation Notes                                                    24
  97.  
  98.   A.1 Timestamp recovery  . . . . . . . . . . . . . . . . . . . . . . . . 24
  99.  
  100.   A.2 Detecting the Beginning of a Synchronization Unit . . . . . . . . . 25
  101.  
  102.   A.3 Demultiplexing and Locating the Synchronization Source  . . . . . . 26
  103.  
  104. B Addresses of Authors                                                    27
  105.  
  106.  
  107.  
  108. 1 Introduction
  109.  
  110.  
  111. This draft concisely specifies a real-time transport protocol.  A discussion
  112. of the design decisions can be found in the current version of the companion
  113.  
  114. H. Schulzrinne/S. Casner              Expires 10/01/93              [Page 2]
  115.  
  116.  
  117. INTERNET-DRAFT                       RTP                       July 30, 1993
  118.  
  119. Internet draft draft-ietf-avt-issues.txt.   The transport protocol  provides
  120. end-to-end delivery services for one or more s_t_r_e_a_m_s_ of data with  real-time
  121. characteristics, for example,  interactive audio  and video.    It does  n_o_t_
  122. guarantee delivery or prevent out-of-order delivery, nor does it assume that
  123. the underlying network is reliable and  delivers packets in sequence.   [The
  124. sequence numbers included  in RTP allow  the end system  to reconstruct  the
  125. sender's packet sequence, but sequence numbers may also be used to determine
  126. the proper location  of a  packet, for  example in  video decoding,  without
  127. necessarily decoding packets in sequence].   RTP is  designed to run on  top
  128. of a variety  of network  and transport  protocols, for  example, IP,  ST-II
  129. or UDP. [For most  applications, RTP  offers insufficient demultiplexing  to
  130. run directly on IP.] RTP transfers  data in a single direction, possibly  to
  131. multiple destinations if supported by the  underlying network.  A  mechanism
  132. for indicating a return path for control data is provided.
  133.  
  134. While RTP is primarily  designed to satisfy  the needs of  multi-participant
  135. multimedia conferences, it  is not limited  to that particular  application.
  136. Storage of continuous data, interactive distributed simulation, active badge
  137. and control  and  measurement applications  may  also find  RTP  applicable.
  138. Profiles are  used to  instantiate  certain header  fields and  options  for
  139. particular sets of applications.  A profile for audio and video data may  be
  140. found in the companion Internet draft draft-ietf-avt-profile.txt.
  141.  
  142. This document defines two packet formats and protocols:
  143.  
  144.  
  145.   o the  real-time  transport  protocol  (RTP)  for  exchanging  data   with
  146.     real-time properties.
  147.  
  148.   o the real-time  control protocol (RTCP)  for conveying information  about
  149.     the sites  in an  on-going association.    RTCP options  may be  ignored
  150.     without affecting the ability to  correctly receive data.  RTCP is  used
  151.     for loosely  controlled conferences,  i.e., where there  is no  explicit
  152.     admission control  and set-up.   Its  functionality may  be subsumed  by
  153.     a  conference control  protocol  (which  is  beyond the  scope  of  this
  154.     document).
  155.  
  156.  
  157.  
  158. 2 Protocol Conventions
  159.  
  160.  
  161. Control fields  (options) for  RTP and  RTCP share  the same  structure  and
  162. numbering space and are carried within the same packet.  Options may  appear
  163. in any  order, unless  specifically restricted  by the  option  description.
  164. [The position of some security options may have significance.]  Each  option
  165. consists of the final bit, the  option type designation, a one-octet  length
  166. field denoting the total number of  32-bit long words comprising the  option
  167. (including final  bit, type  and length),  and  finally any  option-specific
  168. data.  The last option before the packet data portion (``payload'') has  the
  169. 'F' (final) bit set to one, for all other options this field has a  value of
  170.  
  171.  
  172. H. Schulzrinne/S. Casner              Expires 10/01/93              [Page 3]
  173.  
  174.  
  175. INTERNET-DRAFT                       RTP                       July 30, 1993
  176.  
  177. zero.
  178.  
  179. Fields within the fixed header and within options are aligned to the natural
  180. length of  the field,  i.e., 16-bit  words are  aligned  on even  addresses,
  181. 32-bit long words are aligned at addresses  divisible by four, etc.   Octets
  182. designated as padding  have the  value zero.    Options unknown  to the  RTP
  183. implementation or the application  are to be ignored.   Options with  option
  184. types having values  from 64 to  127 inclusive  are to be  used for  private
  185. extensions.  Fields designated as 'reserved' or 'R' are set aside for future
  186. use; they should be set to zero by senders and ignored by receivers.
  187.  
  188. All integer  fields  are  carried in  network  byte  order,  that  is,  most
  189. significant byte (octet)  first.   The  transmission order  is described  in
  190. detail in [1], Appendix A. Unless otherwise noted, numeric constants are  in
  191. decimal (base 10).  Numeric constants prefixed by '0x' are in hexadecimal.
  192.  
  193. Textual information is  encoded accorded to  the UTF-2 encoding  of the  ISO
  194. standard 10646 (Annex F) [2,3].  US-ASCII  is a subset of this encoding and
  195. requires no additional encoding.   The presence  of multi-byte encodings  is
  196. indicated by setting the  most significant bit to  a value of one.   A  byte
  197. with a binary value of zero may  be used as a string terminator for  padding
  198. purposes.
  199.  
  200. [Text in square brackets is intended to motivate the design decisions made.]
  201.  
  202.  
  203.  
  204. 3 Real-time Data Transfer Protocol -- RTP
  205.  
  206.  
  207. 3.1 Definitions
  208.  
  209.  
  210. P_a_y_l_o_a_d_ is the data following the RTP fixed header and the RTP/RTCP options.
  211. The payload format and interpretation are beyond the scope of this memo.   A
  212. valid RTP packet may carry no payload.
  213.  
  214. An R_P_D_U_ stands for RTP protocol data unit.  It consists of the encapsulation
  215. specific to a particular underlying protocol, the fixed RTP header, RTP  and
  216. RTCP options (if any) and the payload, if any.
  217.  
  218. A s_y_n_c_h_r_o_n_i_z_a_t_i_o_n_ s_o_u_r_c_e_ is the combination  of one or more content  sources
  219. with its  own  timing.    The  RPDUs  emitted by  a  synchronization  source
  220. have non-decreasing sequence  numbers and  time stamps  (modulo their  field
  221. lengths).  The  audio coming from  a microphone or the  video from a  source
  222. are examples of synchronization sources.  Typically, a single source emits a
  223. single medium (e.g., audio or video).  A synchronization source is a  member
  224. of exactly one  channel, as  defined below.   A  synchronization source  may
  225. change its data format  over time.   Synchronization sources are  identified
  226. by their source network address, source transport address (e.g., UDP  source
  227. port) and the value of SSRC identifier carried  in the SSRC option.  If  the
  228.  
  229.  
  230. H. Schulzrinne/S. Casner              Expires 10/01/93              [Page 4]
  231.  
  232.  
  233. INTERNET-DRAFT                       RTP                       July 30, 1993
  234.  
  235. SSRC option is not present, a value of zero for that identifier is assumed.
  236.  
  237. A c_o_n_t_e_n_t_ s_o_u_r_c_e_ is the actual source of the data carried, for example,  the
  238. user and host that originally generated the audio data.  One or more content
  239. sources may contribute data for one synchronization source.  Content sources
  240. are used for identifying the logical source of the data; they have no effect
  241. on the delivery of the data itself.
  242.  
  243. A n_e_t_w_o_r_k_ s_o_u_r_c_e_ is  the network-level origin  of the RPDUs  as seen by  the
  244. receiving end system.
  245.  
  246. All  sources  sending   to  the   same  destination   network  address   and
  247. transport-level address using the  same RTP flow  identifier belong to  same
  248. c_h_a_n_n_e_l_.
  249.  
  250. An e_n_d_ s_y_s_t_e_m_ generates the content to  be used in RTP packets and  delivers
  251. the content of received RTP packets to the user application.  An end  system
  252. can act as  one or  more synchronization  sources.   (Most  end systems  are
  253. expected to be a single synchronization source.)
  254.  
  255. An (RTP-level)  b_r_i_d_g_e_  receives  RTP  packets from  one  or  more  sources,
  256. combines them in some manner and then forwards  a new RTP packet.  A  bridge
  257. may change the data format.   Since the  timing among multiple input  source
  258. will not generally be synchronized, the bridge will make timing  adjustments
  259. among the  streams and  generate its  own timing  for the  combined  stream.
  260. Therefore, bridges are  synchronization sources,  with each  of the  sources
  261. whose packets  were combined  into an  outgoing RTP  packet as  the  content
  262. sources for that outgoing  packet.  Audio  bridges and media converters  are
  263. examples of bridges.  Example:   assume SMITH@FOO and JONES@BAR are using  a
  264. bridge to translate their audio  from one encoding to  another.  The  bridge
  265. mixes audio packets  from Smith and  Jones together and  forwards the  mixed
  266. packets.   If,  say, Smith  was talking,  she  is indicated  as the  content
  267. source of the outgoing packet, allowing the receiver to properly display the
  268. current speaker rather  than just  the bridge  that mixed  the audio.    For
  269. an end system  receiving RTP  packets from that  bridge, the  bridge is  the
  270. synchronization source and Smith the content source.  The RTP-level  bridges
  271. described in  this document  are unrelated  to the  data link-layer  bridges
  272. found in local area networks.   If there  is possibility for confusion,  the
  273. term 'RTP-level bridge' should be used.   [The name 'bridge' follows  common
  274. telecommunication usage.]
  275.  
  276. An (RTP-level) t_r_a_n_s_l_a_t_o_r_ does not alter the timing of packets.  Examples of
  277. its use include encoding conversion  without mixing or retiming,  conversion
  278. from multicast  to  unicast,  and application-level  filters  in  firewalls.
  279. A translator  is  neither a  synchronization  nor a  content  source.    The
  280. properties of bridges and translators are summarized in Table 1.  Checkmarks
  281. in parentheses designate possible, but unlikely actions.
  282.  
  283. A s_y_n_c_h_r_o_n_i_z_a_t_i_o_n_ u_n_i_t_ consists  of one or  more packets that,  as a  group,
  284. share a common fixed  delay between generation and  playout of each part  of
  285. the group, or can only be scheduled as a whole.  The delay may change at the
  286.  
  287.  
  288. H. Schulzrinne/S. Casner              Expires 10/01/93              [Page 5]
  289.  
  290.  
  291. INTERNET-DRAFT                       RTP                       July 30, 1993
  292.  
  293.  
  294.  
  295.                                     end sys.  bridge  translator
  296.            mix sources                 --        x        --
  297.            change encoding             N/A       x        x
  298.            encrypt                      x        x       (x)
  299.            sign for authentication      x        x        --
  300.            touch content                x        x       (x)
  301.            insert CSRC                 --        x        --
  302.            insert SSRC                  x        x        x
  303.            insert SDST                  x        x        --
  304.            insert SDES                  x        x        --
  305.  
  306.  
  307.       Table 1:  The properties of end systems, bridges and translators
  308.  
  309. beginning of such a synchronization unit.   The most common  synchronization
  310. units are talkspurts for voice and frames for video transmission.
  311.  
  312. N_o_n_-_R_T_P_ m_e_c_h_a_n_i_s_m_s_  refers to  other protocols  and mechanisms  that may  be
  313. needed to  provide  a  useable  service.    In  particular,  for  multimedia
  314. conferences, a  conference  control application  may  distribute  encryption
  315. and authentication  keys, negotiate  the encryption  algorithm to  be  used,
  316. determine the mapping from  the RTP format field  to the actual data  format
  317. used.  For simple applications, electronic mail or a conference database may
  318. also be used.   The  specification of  the mechanism itself  is outside  the
  319. scope of this memorandum.
  320.  
  321.  
  322. 3.2 RTP Fixed Header Fields
  323.  
  324.  
  325. The RTP header has the following format:
  326.  
  327.  
  328.  
  329.  0                   1                   2                   3
  330.  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  331. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  332. |Ver|   FlowID  |P|S|  format   |       sequence number         |
  333. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  334. |     timestamp (seconds)       |     timestamp (fraction)      |
  335. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  336. | options ...                                                   |
  337. +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  338.  
  339.  
  340. The fields in the  first eight octets  are present in  every RTP packet  and
  341. have the following meaning:
  342.  
  343.  
  344. protocol version: 2 bits
  345.  
  346. H. Schulzrinne/S. Casner              Expires 10/01/93              [Page 6]
  347.  
  348.  
  349. INTERNET-DRAFT                       RTP                       July 30, 1993
  350.  
  351.     Defines  the protocol  version.    The version  number of  the  protocol
  352.     defined in this memo is one.
  353.  
  354. FlowID: 6 bits
  355.     The value  of the  field is  the flow  identifier, which  forms part  of
  356.     the tuple identifying  a channel (see definition above).   [The flow  ID
  357.     field is  convenient if several  different channels are  to receive  the
  358.     same treatment  by the  underlying layers  or  if a  profile allows  for
  359.     the concatenation of several  RPDUs on different channels into a  single
  360.     protocol data unit of the underlying protocol layer.]
  361.  
  362. option present bit (P): 1 bit
  363.     This flag has a value of one if the fixed RTP header is followed  by one
  364.     or more options and a value of zero otherwise.
  365.  
  366. end-of-synchronization-unit (S): 1 bit
  367.     This flag has  a value of  one in the last  packet of a  synchronization
  368.     unit, a value of zero otherwise.  [As shown in Section A,  the beginning
  369.     of a  synchronization unit can  be readily established  from this  flag.
  370.     If this flag were to signal to the beginning of a  synchronization unit,
  371.     the end  of a  synchronization unit  could  not be  established in  real
  372.     time.]
  373.  
  374. format: 6 bits
  375.     The  'format'  field  forms  an  index  into  a  table  defined  through
  376.     the  RTCP FMT  option or  non-RTP  mechanisms (see  Section  3.1.    The
  377.     mapping establishes  the format of  the RTP payload  and determines  its
  378.     interpretation by  higher layers.   If  no mapping has  been defined  in
  379.     this manner,  a standard mapping is  specified by the companion  profile
  380.     document, RFC TBD. Also,  default formats may be defined by the  current
  381.     edition of the Assigned Numbers RFC.
  382.  
  383. sequence number: 16 bits
  384.     The sequence  number counts RPDUs.   The  sequence number increments  by
  385.     one for  each packet  sent.   [The sequence  number may be  used by  the
  386.     receiver  to detect  packet  loss, to  restore  packet sequence  and  to
  387.     identify packets to the application.]
  388.  
  389. timestamp: 32 bits
  390.     The timestamp reflects the  wallclock time when the RPDU was  generated.
  391.     The timestamp consists of the middle 32 bits of a 64-bit  NTP timestamp,
  392.     as defined in RFC 1305 [4].  Several consecutive packets may  have equal
  393.     timestamps.
  394.  
  395.     The  timestamp of  the first  packet(s)  within a  synchronization  unit
  396.     is expected  to closely  reflect the actual  sampling instant,  measured
  397.     by  the  local  system  clock.     The  local  system  clock  should  be
  398.     controlled  by a  time  synchronization protocol  such  as NTP  if  such
  399.     a service  is available.    It  is not  expected that  the local  system
  400.     clock  be referenced  to  obtain  the  timestamp for  the  beginning  of
  401.     every synchronization  unit, but  the local clock  should be  referenced
  402.  
  403.  
  404. H. Schulzrinne/S. Casner              Expires 10/01/93              [Page 7]
  405.  
  406.  
  407. INTERNET-DRAFT                       RTP                       July 30, 1993
  408.  
  409.     frequently enough so that clock drift between synchronized  system clock
  410.     and  sampling clock  can  be compensated  for  gradually.    Within  one
  411.     synchronization unit, it may be appropriate to compute  timestamps based
  412.     on the  logical timing  relationships between the  packets.   For  audio
  413.     samples, for  example, the nominal  sampling interval may be  used.   If
  414.     the clock quality field of the CDES option does not  indicate otherwise,
  415.     it is assumed that  the timestamp at the beginning of a  synchronization
  416.     unit is  derived  from a  synchronized system  clock.   However,  it  is
  417.     allowable to  operate without synchronized time  on those systems  where
  418.     it is  not  available, unless  a profile  or session  protocol  requires
  419.     otherwise.
  420.  
  421.  
  422.  
  423. 3.3 The RTP Options
  424.  
  425.  
  426. The packet header may be followed by  options and the payload.  Options  are
  427. summarized below.  Unless otherwise noted, each option may appear only  once
  428. per packet.  Each  packet may contain any number  of options.  A  conforming
  429. implementation of RTP  has to support  the RTP options  listed here,  unless
  430. otherwise noted.
  431.  
  432.  
  433. CSRC 0   Content source identifiers.  The content source option is  inserted
  434.         only by bridges and identifies  all sources that contributed to  the
  435.         packet.  For example, for audio packets, all sources that were mixed
  436.         together to create this packet  are listed, allowing correct  talker
  437.         indication at the  receiver.   Each CSRC option  may contain one  or
  438.         more content source identifiers, each 16 bits long.  The  identifier
  439.         values must be  unique for  all content sources  received through  a
  440.         particular synchronization source (bridge) on a particular  channel;
  441.         the value of binary zero  is reserved and may not  be used.  If  the
  442.         number of content sources is even, the two octets needed to pad  the
  443.         list to a multiple  of four octets  are set to zero.   There  should
  444.         only be a single CSRC option within a packet.  If no CSRC  option is
  445.         present, the content source identifier is assumed to have a value of
  446.         zero.  CSRC options are not modified by RTP-level translators.
  447.  
  448.         A conformant RTP implementation does not have to be able to generate
  449.         or interpret the CSRC option.
  450.  
  451.  
  452.          0                   1                   2                   3
  453.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  454.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  455.         |F|    CSRC     |    length     | content source identifier    ...
  456.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  457.  
  458. SSRC 1   Synchronization  source  identifier.     The  SSRC  option  may  be
  459.         inserted by RTP-level  translators,  end systems  and bridges.    It
  460.         is typically used  only by  translators, but  it may be  used by  an
  461.  
  462. H. Schulzrinne/S. Casner              Expires 10/01/93              [Page 8]
  463.  
  464.  
  465. INTERNET-DRAFT                       RTP                       July 30, 1993
  466.  
  467.         end system application to distinguish several sources sent with  the
  468.         same lower-layer source address.   Each synchronization source  with
  469.         the same lower-layer  address (e.g.,  the  same IP  address and  UDP
  470.         port) must have  a distinct SSRC.  Synchronization sources that  are
  471.         distinguishable by their lower-layer address do not require the  use
  472.         of SSRC options.   The SSRC value zero is  reserved and must not  be
  473.         used.  If no SSRC option  is present, the network source is  assumed
  474.         to indicate the synchronization source.  There must be no more  than
  475.         one SSRC identifier per  packet; thus, a  translator must remap  the
  476.         SSRC identifier of  an incoming packet  into a  new, locally  unique
  477.         SSRC identifier.  The SSRC option may be considered in functionality
  478.         as an extension  of the source  port number in  protocols like  UDP,
  479.         ST-II or TCP.
  480.  
  481.         A RTP receiver must support the SSRC option.  RTP senders only  need
  482.         to support this option if they  intend to send more than one  source
  483.         to the same channel using the same source port.
  484.  
  485.  
  486.          0                   1                   2                   3
  487.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  488.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  489.         |F|    SSRC     | length = 1    | identifier                    |
  490.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  491.  
  492. BOP 3   (beginning of playout unit)  16-bit sequence number designating  the
  493.         first packet within the current playout unit.
  494.  
  495.  
  496.          0                   1                   2                   3
  497.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  498.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  499.         |F|     BOP     | length = 1    | sequence number               |
  500.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  501.  
  502.  
  503.  
  504. 3.4 Reverse-Path Option
  505.  
  506.  
  507. With two-party (unicast) communications,  relaying back control  information
  508. to the sender is  easy.  For  multicast communications, control  information
  509. can be sent to all members of the  group.  It may, however, be desirable  to
  510. send a message to  an individual member  of a multicast  group, for  example
  511. to request retransmission of  a particular data frame  or to request/send  a
  512. reception quality report.  For this particular use, we introduce a mechanism
  513. for sending so-called reverse RPDUs.   The RPDU  format of reverse RPDUs  is
  514. exactly the  same as  for regular  messages and  they can  make use  of  all
  515. the options defined in  this memorandum.   Reverse RPDUs travel through  the
  516. same translators as other RPDUs.   The receiver distinguishes reverse  RPDUs
  517. by their arrival on  a different transport selector  (e.g., a different  UDP
  518. port), namely the  same one  which is  used as a  source transport  selector
  519.  
  520. H. Schulzrinne/S. Casner              Expires 10/01/93              [Page 9]
  521.  
  522.  
  523. INTERNET-DRAFT                       RTP                       July 30, 1993
  524.  
  525. (e.g., UDP source  port) for  forward RPDUs.   A receiver  of reverse  RDPUs
  526. cannot rely on any sequence  number ordering, as a  sender may use the  same
  527. sequence number  space while  communicating through  this reverse  mechanism
  528. with several receivers.  The sequence  number space of reverse RPDUs has  to
  529. be completely separate from that used for RPDUs sent to the multicast group.
  530. If the same sequence  number space were used,  the members of the  multicast
  531. group not  receiving reverse  RPDUs would  detect a  gap in  their  received
  532. sequence number space.
  533.  
  534.  
  535.  
  536. SDST 2   Synchronization destination identifier.   The  SDST option is  only
  537.         inserted by  RTP  end systems  and  bridges  if they  want  to  send
  538.         unicast information to a particular site within the multicast group.
  539.         Packets containing an SDST  option must not  contain an SSRC  option
  540.         and vice versa.   The identifier value  zero is allowed, unlike  for
  541.         SSRC options (see example below).
  542.  
  543.         Denote the the end system that wants to return a unicast message  by
  544.         S and the desired destination end system of that unicast message  by
  545.         D. If the  multicast packets received  by S from  D contain no  SSRC
  546.         option, S and D must  be directly connected, without an  intervening
  547.         translator.  No SDST option is need in this case.
  548.  
  549.         If the multicast packet received by S from D contain an SSRC option,
  550.         S inserts  an SDST  option  using the  identifier contained  in  the
  551.         SSRC option  received from  D. D  then forwards  the packet  to  the
  552.         source network and transport address found in the multicast  packets
  553.         coming from D.  The packet  will thus  reach the  translator on  the
  554.         path between S  and D closest  to S. The  arrival on that  transport
  555.         address tells the translator  that the packet  is a unicast  reverse
  556.         control packet.    The translator  determines which  source it  maps
  557.         into the identifier contained  in the SDST  option and replaces  the
  558.         SDST identifier by that value.   In other words:   if a forward  RTP
  559.         packet carries SSRC  identifier X  between two  systems (either  two
  560.         translators or an end system and a translator), the unicast  reverse
  561.         control packet will carry SDST  with identifier X between those  two
  562.         systems.
  563.  
  564.         Example for  UDP: T1  and  T2 are  translators between  end  systems
  565.         S and  D. In  the forward  direction, D  sends regular  RTP  packets
  566.         with no SSRC to (among other multicast group members) translator  T2
  567.         with destination port  3456 and source  port 5678;  T2 inserts  SSRC
  568.         identifier 13  and forwards  to translator  T1 on  source port  4590
  569.         and destination port  3456; T1 translates  SSRC 13  into SSRC 8  and
  570.         forwards to S using destination port 3456 and source port 12789.  In
  571.         the unicast reverse RPDU, site S sends the packet to translator  T1,
  572.         destination port 12789 with SDST value 8.  T1 replaces SDST value  8
  573.         with SDST value 13  and forwards to  translator T2 with  destination
  574.         port 4590.  T2 finally sends the message with SDST value 0 to site D
  575.         at destination port 5678.   By its  arrival port, site D  determines
  576.         that the RPDU is a reverse RPDU and treat it accordingly.
  577.  
  578. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 10]
  579.  
  580.  
  581. INTERNET-DRAFT                       RTP                       July 30, 1993
  582.  
  583.         [Reverse control  unicast packets  are already  identified by  their
  584.         destination transport address,  so SSRC  could be  used for  reverse
  585.         control packets.  A separate option is used to limit confusion.]
  586.  
  587.         Only applications  that  need to  send  or receive  unicast  control
  588.         information flow need to implement the SDST option.
  589.  
  590.  
  591.          0                   1                   2                   3
  592.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  593.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  594.         |F|    SDST     | length = 1    |           identifier          |
  595.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  596.  
  597.  
  598.  
  599. 3.5 Security Options
  600.  
  601.  
  602. The security  options  below offer  message  integrity,  authentication  and
  603. privacy and the combination of the three.
  604.  
  605. Support for the security  options is not mandatory,  but see the  discussion
  606. for the ENC option.  The four message integrity check options --- MIC, MICA,
  607. MICK and MICS --- are mutually exclusive,  i.e., only one of them should  be
  608. used for a single RPDU.
  609.  
  610. All message  integrity check  options are  computed over  the fixed  header,
  611. the ENC option preceding  the message integrity  check option (if  present),
  612. the first four  octets of the  message integrity check  option and the  data
  613. (remaining header and payload) following the message integrity check option.
  614.  
  615. The message  integrity check  options and  the ENC  option shall  not  cover
  616. the SSRC and  SDST options,  i.e., SSRC  and SDST must  be inserted  between
  617. the fixed header and  the ENC or  message integrity check  options, as  SSRC
  618. and SDST  are  subject to  change  by translators  that  are likely  not  in
  619. possession of  the necessary  descriptor table  (see below)  and  encryption
  620. keys.  Translators that have  the necessary keys and descriptor  translation
  621. table may modify the contents  of the RPDU, unless  the MICA option is  used
  622. (see MICA description).
  623.  
  624. All security options carry  a one-octet descriptor field.   This  descriptor
  625. is an index into  two tables, one for  the message integrity check  options,
  626. one for the  ENC option,  established  by non-RTP means,  containing  digest
  627. algorithms (MD2,  MD5,  etc.),  encryption  algorithms  (DES  variants)  and
  628. encryption keys or shared secrets (for the MICK option).  All sources within
  629. the same channel  share the same  table.   The descriptor  value may  change
  630. during a session, for example, to use a different set of encryption keys.
  631.  
  632. The descriptor value zero describes a set of default algorithms to be  used:
  633. MD5 for the message digest algorithm, DES CBC for the encryption algorithm.
  634.  
  635.  
  636. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 11]
  637.  
  638.  
  639. INTERNET-DRAFT                       RTP                       July 30, 1993
  640.  
  641. The MIC, MICK and MICS message integrity checks offer g_r_o_u_p_  a_u_t_h_e_n_t_i_c_a_t_i_o_n_,
  642. that is, the receiver can ascertain  that the RPDU originated from a  member
  643. of the group  of sites  sharing a  common secret,  but  the receiver  cannot
  644. authenticate which of  the sources  among that  group sent  the data.    The
  645. receiver can also be assured that nobody outside the group tampered with the
  646. RPDU.
  647.  
  648.  
  649.  
  650. ENC 8   All packet  data  after  this option,  but  not  the  fixed  header,
  651.         is encrypted,  using the  encryption  key and  symmetric  encryption
  652.         algorithm specified by the descriptor  field.  The descriptor  value
  653.         may change over time to accomodate varying security requirements  or
  654.         reduce the amount of ciphertext using  the same key.  [For  example,
  655.         in a network interview, the  candidate and interviewers could  share
  656.         one key, with a second key set aside for the interviewers only.  For
  657.         symmetric keys, source-specific keys offer no advantage.]
  658.  
  659.         The descriptor  value zero  is  reserved for  a default  mode  using
  660.         the Data Encryption  Standard (DES) algorithm  in CBC (cipher  block
  661.         chaining) mode, as described in  Section 1.1 of RFC  1423 [5].   The
  662.         padding specified  in that  section is  to  be used.    The  8-octet
  663.         initialization vector (IV) may be carried unencrypted within the ENC
  664.         option or generated anew for  each packet.   If the ENC option  does
  665.         not contain an initialization vector (indicated by an option  length
  666.         of 1), the  fixed RTP  header is used  as the IV.  [Using the  fixed
  667.         RTP header as  the IV  avoids regenerating  the IV  for each  packet
  668.         and incurs less  header overhead.]    For details  on the  tradeoffs
  669.         for CBC IV use, see  [6].  Support  for encryption is not  required.
  670.         Implementations that do not support encryption should recognize  the
  671.         ENC option  so that  they can  avoid processing  encrypted  messages
  672.         and provide a meaningful failure  indication.  Implementations  that
  673.         support encryption should,  at the minimum,  always support the  DES
  674.         CBC algorithm.
  675.  
  676.  
  677.          0                   1                   2                   3
  678.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  679.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  680.         |F|     ENC     |   length = 3  |    reserved   |   descriptor  |
  681.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  682.         | DES (CBC) initialization vector, bytes 0 through 3            |
  683.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  684.         | DES (CBC) initialization vector, bytes 4 through 7            |
  685.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  686.  
  687.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  688.         |F|     ENC     |   length = 1  |    reserved   |   descriptor  |
  689.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  690.  
  691.  
  692.  
  693.  
  694. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 12]
  695.  
  696.  
  697. INTERNET-DRAFT                       RTP                       July 30, 1993
  698.  
  699. MIC 9   Messsage integrity check.   The  MIC option option  is used only  in
  700.         combination with the ENC option immediately preceding it to  provide
  701.         privacy and group membership authentication.  The message  integrity
  702.         check uses the digest algorithm  specified by the descriptor  field.
  703.         The value zero implies the use of the MD5 message digest.  Note that
  704.         the MIC option is not separately encrypted.
  705.  
  706.  
  707.          0                   1                   2                   3
  708.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  709.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  710.         |F|     MIC     |     length    |    reserved   |   descriptor  |
  711.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  712.         |                 message digest (unencrypted)                 ...
  713.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  714.  
  715.  
  716. MICA 10   Message integrity check, asymmetric  encryption.  Currently,  only
  717.         the use of the MD2 and MD5 message digest algorithms is defined,  as
  718.         described in RFC 1319 [7] (as corrected in Section 2.1 of RFC  1423)
  719.         and RFC 1321 [8], respectively.  The MD2 and MD5 message digests are
  720.         16 octets long.
  721.  
  722.         ``To avoid any  potential ambiguity  regarding the  ordering of  the
  723.         octets of  an MD2  message digest  that  is input  as a  data  value
  724.         to another encryption process  (e.g., RSAEncryption), the  following
  725.         holds true.   The first (or  left-most displayed,  if one thinks  in
  726.         terms of  a digest's  "print" representation)  octet of  the  digest
  727.         (i.e., digest[0]  as  specified in  RFC 1319),  when  considered  as
  728.         an RSA  data value,  has  numerical weight  2**120.   The  last  (or
  729.         right-most displayed) octet  (i.e., digest[15] as  specified in  RFC
  730.         1319) has numerical weight 2**0.''  [RFC 1423, Section 2.1]
  731.  
  732.         ``To avoid any  potential ambiguity  regarding the  ordering of  the
  733.         octets of a MD5 message digest that is input as an RSA data value to
  734.         the RSA encryption process, the following holds true.  The first (or
  735.         left-most displayed, if one  thinks in terms  of a digest's  "print"
  736.         representation) octet of the  digest (i.e.,  the low-order octet  of
  737.         A as specified in RFC 1321),  when considered as an RSA data  value,
  738.         has numerical weight  2**120.   The last  (or right-most  displayed)
  739.         octet (i.e., the high-order octet of D as specified in RFC 1321) has
  740.         numerical weight 2**0.''  [RFC 1423, Section 2.2]
  741.  
  742.         The message digest  is encrypted,  using asymmetric  keys, with  the
  743.         sender's private key using the algorithm described in Section  4.2.1
  744.         of RFC 1423:   ``As described in  PKCS #1,  all quantities input  as
  745.         data values to the RSAEncryption process shall be properly justified
  746.         and padded to  the length  of the  modulus prior  to the  encryption
  747.         process.   In general,  an RSAEncryption  input value  is formed  by
  748.         concatenating a  leading NULL  octet,  a block  type BT,  a  padding
  749.         string PS, a NULL octet, and the data quantity D, that is, RSA input
  750.  
  751.  
  752. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 13]
  753.  
  754.  
  755. INTERNET-DRAFT                       RTP                       July 30, 1993
  756.  
  757.         value = 0x00, BT, PS, 0x00,  D. To prepare a MIC for  RSAEncryption,
  758.         the PKCS  #1 ``block  type 01''  encryption-block formatting  scheme
  759.         is employed.   The block type  BT is a  single octet containing  the
  760.         value 0x01 and the padding string  PS is one or more octets  (enough
  761.         octets to make  the length  of the  complete RSA  input value  equal
  762.         to the length of  the modulus) each containing  the value 0xFF.  The
  763.         data quantity  D is  comprised  of the  MIC  and the  MIC  algorithm
  764.         identifier.''.   The encoding is  described in detail  in RFC  1423.
  765.         For encrypting MD2 and MD5, the data quantity D is comprised of  the
  766.         16-byte checksum, preceded  by the  binary sequences  shown here  in
  767.         hexadecimal:  0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86,  0x48,
  768.         0x86, 0xF7, 0x0D,  0x02, 0x02, 0x05,  0x00, 0x04,  0x10 for MD2  and
  769.         0x30, 0x20, 0x30, 0x0C,  0x06, 0x08, 0x2A,  0x86, 0x48, 0x86,  0xF7,
  770.         0x0D, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10 for MD5.
  771.  
  772.         The signature is padded as necessary.   The value of the padding  is
  773.         left unspecified.  [Note:  The number of non-padding bits within the
  774.         signature is known to the receiver as being equal to the key length.
  775.         The MIC algorithm is identified  through the bytes prepended to  the
  776.         actual 16-byte signature.]
  777.  
  778.         Contrary to what is specified in RFC 1423 for privacy enhanced mail,
  779.         the asymmetrically signed MIC is carried in binary, NOT  represented
  780.         in the  printable  encoding of  RFC  1421,  Section 4.3.2.4.     The
  781.         encrypted length of the  signature will be equal  to the modulus  of
  782.         the RSA encryption used,  rounded to the  next integral byte  count.
  783.         The modulus and public key is  conveyed to the receivers by  non-RTP
  784.         means.  [Note:  Asymmetric keys are used since symmetric keys  would
  785.         not allow authentication of the  individual source in the  multicast
  786.         case.]
  787.  
  788.         A translator that  receives an  RPDU is  not allowed  to modify  the
  789.         parts of the RPDU covered by  the MICA option as the receiver  would
  790.         have no way of establishing the identity of the translator and  thus
  791.         could not verify the integrity of the RDPU.
  792.  
  793.         Support for sending or interpreting MICA options is not required.
  794.  
  795.  
  796.          0                   1                   2                   3
  797.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  798.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  799.         |F|    MICA     |    length     |  encrypted message-digest    ...
  800.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  801.  
  802. MICK 11   Message integrity  check, keyed.    This message  integrity  check
  803.         does not require encryption.   In addition to  the RPDU parts to  be
  804.         included in the message digest according to the introduction to this
  805.         section, the shared secret is placed in the MICK option and included
  806.         in the message  digest.   (The shared  secret is  equivalent to  the
  807.         key used for the  MICS and ENC  options, but is  16 octets long,  if
  808.  
  809.  
  810. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 14]
  811.  
  812.  
  813. INTERNET-DRAFT                       RTP                       July 30, 1993
  814.  
  815.         necessary by padding with binary zeroes.)  The shared secret in  the
  816.         MICK option is then replaced by the computed 128-bit digest.
  817.  
  818.         The receiver saves the message digest contained in the MICK  option,
  819.         replacing it with  the shared  secret key and  computes the  message
  820.         digest in the same manner as the sender.   If the RPDU has not  been
  821.         tampered and originated with one of  the holders of the secret  key,
  822.         the computed  message digest  will agree  with the  digest found  on
  823.         reception in the MICS option.
  824.  
  825.         [The message integrity check follows the practice of SNMP Version 2,
  826.         as described in RFC  1446, Section  1.5.1.   The MICS option  itself
  827.         is covered  by the  digest in  order to  detect tampering  with  the
  828.         descriptor field itself.    Using the  secret key  in the  signature
  829.         instead of encrypting the  MD5 message digest avoids  the use of  an
  830.         encryption algorithm when only authentication is desired.   However,
  831.         the security of this  approach has not been  as well established  as
  832.         that based on encrypting message digests,  as used in the MICS,  MIC
  833.         and MICA options.]
  834.  
  835.  
  836.          0                   1                   2                   3
  837.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  838.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  839.         |F|    MICS     |    length     |   reserved    |   descriptor  |
  840.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  841.         |                     encrypted message digest                 ...
  842.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  843.  
  844. MICS 12   Message integrity check,  symmetric-key encrypted.   This  message
  845.         integrity check encrypts the  message digest using  DES ECB mode  as
  846.         described in RFC 1423, Section 3.1.
  847.  
  848.  
  849.          0                   1                   2                   3
  850.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  851.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  852.         |F|    MICS     |    length     |   reserved    |   descriptor  |
  853.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  854.         |                     encrypted message digest                 ...
  855.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  856.  
  857.  
  858.  
  859. 3.6 The Use of the Security Options
  860.  
  861.  
  862. Combinations of the message integrity check and ENC security options can  be
  863. used to provide a variety of security services:
  864.  
  865.  
  866.  
  867.  
  868. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 15]
  869.  
  870.  
  871. INTERNET-DRAFT                       RTP                       July 30, 1993
  872.  
  873. confidentiality: Confidentiality   here  means   that  only   the   intended
  874.     receiver(s) can decode  the received RTP packets;  for others, the  data
  875.     contains no  useful  information.   Confidentiality  of the  content  is
  876.     achieved by  encryption using DES.  The presence of  encryption and  the
  877.     initialization vector  is indicated  by the  ENC option.    [Note:   for
  878.     efficiency reasons,  this  specification does  not insist  that  content
  879.     encryption  only  be used  in  connection  with  message  integrity  and
  880.     authentication mechanisms.   In most  all cases, it  will be obvious  to
  881.     the person receiving  the data if he or  she does not possess the  right
  882.     encryption key.]
  883.  
  884. authentication and message integrity: In combination with certificates,  the
  885.     receiver  can  ascertain that  the  claimed  originator  is  indeed  the
  886.     originator  of the  data  (authentication) and  that  the data  has  not
  887.     been altered after  leaving the sender (message  integrity).  These  two
  888.     security services are provided  by the message integrity check  options.
  889.     Certificates for MICA must be distributed through means outside  of RTP.
  890.     The services  offered by MICA and  MIC/MICK/MICS differ:   MIC/MICK/MICS
  891.     differ:   With  MIC/MICK/MICS, the  receiver can  only verify  that  the
  892.     message originated within the group holding the secret key,  rather than
  893.     authenticate the sender  of the message,  while the MICA option  affords
  894.     true authentication of the sender.
  895.  
  896. authentication, message integrity, and confidentiality: By   carrying   both
  897.     the  message  integrity  check  and  ENC  option  in RTP  packets,   the
  898.     authenticity, message  integrity and confidentiality  of the packet  can
  899.     be  assured  (subject to  the  limitations  discussed  in  the  previous
  900.     paragraph).
  901.  
  902.     The message  integrity check is applied  first to the  all parts of  the
  903.     outgoing packet  to be  authenticated, and the  message integrity  check
  904.     option is  prepended to those  parts.   Then, the  packet including  the
  905.     message integrity  check option  is  encrypted using  the shared  secret
  906.     key.    The ENC  option  must be  followed  immediately by  the  message
  907.     integrity check  option,  without any  other options  in between.    The
  908.     receiver first  decrypts the octets  following the ENC  option and  then
  909.     authenticates the  decrypted data using the  signature contained in  the
  910.     message integrity check option.
  911.  
  912.     For this combination of security features and group authentication,  the
  913.     combination ENC and MIC is  recommended (instead of MICS or MICK) as  it
  914.     yields the lowest processing overhead.
  915.  
  916.  
  917. A message integrity  check option followed  by an ENC  option should not  be
  918. used.
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 16]
  927.  
  928.  
  929. INTERNET-DRAFT                       RTP                       July 30, 1993
  930.  
  931. 4 Real Time Control Protocol --- RTCP
  932.  
  933.  
  934. The real-time control protocol (RTCP)  conveys minimal control and  advisory
  935. information during a conference.  It provides support for loosely controlled
  936. conferences, i.e.,  where  participants enter  and leave  without  admission
  937. control and parameter negotiation.   The services provided by RTCP  services
  938. enhance RTP, but an end system does  not have to implement RTCP features  to
  939. participate in conferences(1).   RTCP does not  aim to provide the  services
  940. of a conference control protocol and  does not provide some of the  services
  941. desirable for two-party conversations.  If a conference control protocol  is
  942. in use, the  services of RTCP should  not be required.   (Note:   as of  the
  943. writing of this document, a conference  or session control protocol has  not
  944. been specified within the Internet.)
  945.  
  946. Unless otherwise  noted,  control  information is  carried  periodically  as
  947. options within RPDUs, with  or without payload.   RTCP  packets are sent  to
  948. all members of a conference.   These packets are  part of the same  sequence
  949. nubmer space as RTP packets not containing RTCP options.  The period  should
  950. be varied randomly  to avoid  synchronization of  all sources  and its  mean
  951. should increase with the number of  participants in the conference to  limit
  952. the growth of the overall  network and host interrupt load.   The length  of
  953. the period determines, for example, how long a receiver joining a conference
  954. has to wait in the worst case until it can identify the source.   A receiver
  955. may remove from its list of active sites  a site that it has not heard  from
  956. for a given time-out period; he time-out period may depend on the number  of
  957. sites or the observed average interarrival time of RTCP messages.  Note that
  958. not every periodic message has to contain all RTCP options; for example, the
  959. MAIL part within the SDES option might only be sent every few messages.
  960.  
  961. The item types are defined below:
  962.  
  963.  
  964. FMT 32   Format description.
  965.  
  966.  
  967.         format:  6 bits
  968.             The  'format' field  corresponds to  the  index value  from  the
  969.             'format' RTP fixed header  field, with values ranging from 0  to
  970.             63.
  971.  
  972.         Clock quality:  8 bits
  973.             Provides an  indication as  to the  sender-perceived quality  of
  974.             the timestamps  in the  RTP header.   The  octet is  interpreted
  975.             as a quantity indicating  the maximum dispersion to a root  time
  976.             server measured  in fractions  of a  second and  expressed as  a
  977.  
  978. ------------------------------
  979.  1. There  is one  exception to  that rule:   if  an application  sends  FMT
  980. options, the receiver has to decode these in order to properly interpret the
  981. RTP payload.
  982.  
  983.  
  984. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 17]
  985.  
  986.  
  987. INTERNET-DRAFT                       RTP                       July 30, 1993
  988.  
  989.             power of two.
  990.  
  991.             If a source  is known to be  synchronized to standard time,  but
  992.             with an  unknown dispersion, or the  dispersion is greater  than
  993.             TBD, the  value TBD  is used.    If the  clock is  based on  the
  994.             nominal sample rate of the source, a value of TBD is used.
  995.  
  996.             The clock quality indication can be used to judge how  the delay
  997.             measurements reported by the  QOS option can be interpreted  (as
  998.             absolute delay or only as  delay variation).  It is also  useful
  999.             for determining  to what extent  several sources with  different
  1000.             clocks can be synchronized.
  1001.  
  1002.         Format-dependent data:  variable
  1003.             Format-dependent data  may or may  not appear in  a FMT  option.
  1004.             It is passed to the next layer and not interpreted by RTP.
  1005.  
  1006.  
  1007.         A FMT mapping changes the  interpretation of a given 'format'  value
  1008.         (as carried  in  the  fixed  RTP  header)  starting  at  the  packet
  1009.         containing the  FMT option.    The new  interpretation applies  only
  1010.         to packets  from the  synchronization  source of  this  packet.    A
  1011.         sender should refrain  from changing  the mappings  between the  RTP
  1012.         format field and the other fields  in the FMT option that have  been
  1013.         established through a conference registry, a conference announcement
  1014.         protocol or otherwise.  Dynamic  changes to these values may  result
  1015.         in misinterpretation of RTP payload if the packet(s) containing  the
  1016.         FMT option are lost.
  1017.  
  1018.  
  1019.           0                   1                   2                   3
  1020.           0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1021.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1022.          |F|     FMT     |    length     |R|R|  format   | clock quality |
  1023.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1024.          |  format-dependent data                                       ...
  1025.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1026.  
  1027. SDES 33   This option provides a mapping between a numeric source identifier
  1028.         and one or more  identifying attributes.   [Several attributes  were
  1029.         combined into one option to avoid multiple mappings from identifiers
  1030.         to the receiver site data structure.]  For those applications  where
  1031.         the size of  a multipart SDES  option would be  a concern,  multiple
  1032.         SDES options may be formed with subsets  of the parts to be sent  in
  1033.         separate packets.
  1034.  
  1035.         An end  system or  a bridge  uses  an identifier  value of  zero  to
  1036.         identify itself.  For each  contributor, a bridge forwards the  SDES
  1037.         information received from  that contributor,  but  changes the  SDES
  1038.         source identifier to correspond to the value used in the CSRC option
  1039.         when identifying this contributor.   A bridge that contributes  data
  1040.  
  1041.  
  1042. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 18]
  1043.  
  1044.  
  1045. INTERNET-DRAFT                       RTP                       July 30, 1993
  1046.  
  1047.         to outgoing packets should  use a CSRC  and select another  non-zero
  1048.         source identifier for that  traffic and send  CSRC and SDES  options
  1049.         for it.
  1050.  
  1051.         Translators do not modify  or insert SDES options.   The end  system
  1052.         performs the same mapping  it uses to  identify the content  sources
  1053.         (that is, the combination of network source, synchronization  source
  1054.         and the  source  number  within  this SDES  option)  to  identify  a
  1055.         particular source.   SDES  information is specific  to a  particular
  1056.         flow identifier,  unless  a higher-layer  control  protocol  defines
  1057.         that all  packets  with  the same  source  identifier  (network  and
  1058.         transport-level source addresses and the optional SSRC value) from a
  1059.         set of channels defined by the control protocol are described by the
  1060.         same SDES.
  1061.  
  1062.         Currently, the following items  are defined.   Each has a  structure
  1063.         similar to that  of RTCP  and RTP  options,  that is,  a type  field
  1064.         followed by a length field  (measured in multiples of four  octets).
  1065.         No final bit  is needed  since the  overall length  is known.    All
  1066.         of the  SDES  items are  optional;  however,  if  quality-of-service
  1067.         monitoring is  to be  used,  the  ADDR and  TSEL  items need  to  be
  1068.         provided (see QOS option).
  1069.  
  1070.  
  1071.  
  1072.               type   value description
  1073.               ADDR   1     network address of source
  1074.               TSEL   2     transport address
  1075.               CNAME  4     canonical user and host identifier,
  1076.                            e.g., ``doe@sleepy.megacorp.com'' or
  1077.                            ``sleepy.megacorp.com''
  1078.               MAIL   5     user's electronic mail address
  1079.                            e.g., ``John.Doe@megacorp.com''
  1080.               LOC    8     geographic user location,
  1081.                            e.g., ``Rm.  2A244, Berkeley Heights, NJ''
  1082.               TXT    16    text describing the source,
  1083.                            e.g.,``John Doe, Bit Recycler, Megacorp''
  1084.  
  1085.  
  1086.         Items are padded with the binary value zero to the next multiple  of
  1087.         four octets.  Each item may appear only once unless otherwise noted.
  1088.  
  1089.         A more description of the content of some of these types follows:
  1090.  
  1091.  
  1092.         ADDR:  A source may  send several  network addresses,  but only  one
  1093.             for each address  type value.   Address types are identified  by
  1094.             the Domain Name Service Resource Record (RR) type,  as specified
  1095.             in the  current edition of  the Assigned Numbers  RFC. For  NSAP
  1096.             addresses, the NSEL byte is not included.
  1097.  
  1098.         TSEL:  The protocol identifier uses the IP Protocol Numbers  defined
  1099.  
  1100. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 19]
  1101.  
  1102.  
  1103. INTERNET-DRAFT                       RTP                       July 30, 1993
  1104.  
  1105.             in  the  current  edition  of  the  Assigned  Numbers  RFC.  The
  1106.             figure shows  the  use of  the TSEL  item for  the TCP  and  UDP
  1107.             protocols.  There must be no more than one TSEL item in  an SDES
  1108.             option.  The  TSEL item should precede any address  information.
  1109.             [Multiple  concurrent transport  addresses are  not  meaningful.
  1110.             The ordering simplifies processing at the receiver.]
  1111.  
  1112.         CNAME:  The  CNAME  item  must  have  the  format  ``user@host''  or
  1113.             ``host'', where ``host''  is the fully qualified domain name  of
  1114.             the host  where the  real-time data  originates from,  formatted
  1115.             according to  the  rules specified  in RFC  1034, RFC  1035  and
  1116.             Section 2.1 of  RFC 1123.   The ``host'' form  may be used if  a
  1117.             user name is not available, for example on  single-user systems.
  1118.             The  user name  should be  in  a form  that  a program  such  as
  1119.             ``finger'' or  ``talk'' could  use, i.e.,  it  typically is  the
  1120.             login name rather  than the ``real life'' name.   Note that  the
  1121.             host name  is not necessarily identical  to the electronic  mail
  1122.             address of the participant.  The latter is provided  through the
  1123.             MAIL item.
  1124.  
  1125.         LOC:  Depending on the application, different degrees of detail  are
  1126.             appropriate  for this  item.    For conference  applications,  a
  1127.             string like  ``Tampere, Finland'' may  be sufficient, while  for
  1128.             an active badge system, strings like ``Room 2A244, AT&T  BL MH''
  1129.             might be appropriate.
  1130.  
  1131.  
  1132.  
  1133.           0                   1                   2                   3
  1134.           0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1135.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1136.          |F|     SDES    |    length     |       source identifier       |
  1137.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1138.  
  1139.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1140.          |  type = ADDR  |    length     |    reserved   | address type  |
  1141.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1142.          |                     network-layer address                    ...
  1143.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1144.  
  1145.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1146.          |  type = ADDR  |   length = 2  |    reserved   | addr. type = 1|
  1147.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1148.          |                          IPv4 address                         |
  1149.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1150.  
  1151.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1152.          |  type = TSEL  |    length     |    reserved   | transport pro.|
  1153.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1154.          |                  transport-address (port number)              ...
  1155.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1156.  
  1157.  
  1158. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 20]
  1159.  
  1160.  
  1161. INTERNET-DRAFT                       RTP                       July 30, 1993
  1162.  
  1163.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1164.          |  type = TSEL  |    length     |    reserved   |  protocol = 6 |
  1165.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1166.          |            reserved           |       TCP port number         |
  1167.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1168.  
  1169.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1170.          |  type = TSEL  |    length     |    reserved   | protocol = 17 |
  1171.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1172.          |            reserved           |       UDP port number         |
  1173.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1174.  
  1175.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1176.          |  type = CNAME |    length     | user and domain name         ...
  1177.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1178.  
  1179.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1180.          |  type = MAIL  |    length     | electronic mail address      ...
  1181.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1182.  
  1183.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1184.          |   type = LOC  |    length     | geographic location of site  ...
  1185.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1186.  
  1187.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1188.          |   type = TXT  |    length     | text describing source       ...
  1189.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1190.  
  1191.  
  1192. BYE 35   The BYE  option  indicates that  a  particular site  is  no  longer
  1193.         active.  A bridge sends BYE options with a (non-zero) content source
  1194.         value.   An  identifier  value of  zero  indicates that  the  source
  1195.         indicated by the  synchronization source (SSRC)  option and  network
  1196.         address is no  longer active.   If  a bridge shuts  down, it  should
  1197.         first send BYE options for all content sources it handles,  followed
  1198.         by a BYE option with an identifier value of zero.  Each RTCP message
  1199.         can contain one or  more BYE messages.   [Multiple identifiers in  a
  1200.         single BYE option are not  allowed to avoid ambiguities between  the
  1201.         special value of zero and any necessary padding.]
  1202.  
  1203.  
  1204.          0                   1                   2                   3
  1205.          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1206.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1207.         |F|     BYE     | length = 1    | content source identifier     |
  1208.         +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1209.  
  1210. QOS 36   Quality  of  service  measurement.     The  QOS  options  describes
  1211.         statistics of a single synchronization source.  The  synchronization
  1212.         source is identified by one of  the ADDR items from the SDES  option
  1213.         together with the TSEL item  from the SDES option.   The SDES  items
  1214.  
  1215.  
  1216. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 21]
  1217.  
  1218.  
  1219. INTERNET-DRAFT                       RTP                       July 30, 1993
  1220.  
  1221.         are appended directly to  the fixed-length part  of the QOS  option,
  1222.         with TSEL following ADDR. For a description of these items, see  the
  1223.         SDES option.
  1224.  
  1225.         The other  fields  of the  option  contains the  number  of  packets
  1226.         received (32 bits), the  number of packets  expected (32 bits),  the
  1227.         minimum delay, the maximum delay and  the average delay.  The  delay
  1228.         measures are  encoded as  16/16 NTP  timestamps,  that is,  16  bits
  1229.         encode the number and seconds and 16 bits the fraction of a second.
  1230.  
  1231.         A single RTCP packet may  contain several QOS options.   It is  left
  1232.         to the  implementor to  decide  how often  to transmit  QOS  options
  1233.         and which  sources  are to  be  included.    [The  timestamp  format
  1234.         is identical  to  the  one used  in  the  fixed RTP  header.     The
  1235.         quality-of-service information is identical  to that carried in  the
  1236.         reverse control option.]
  1237.  
  1238.  
  1239.           0                   1                   2                   3
  1240.           0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1241.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1242.          |F|     QOS     |    length     |     synchronization source    |
  1243.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1244.          |                       packets expected                        |
  1245.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1246.          |                       packets received                        |
  1247.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1248.          | minimum delay (seconds)       | minimum delay (fraction)      |
  1249.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1250.          | maximum delay (seconds)       | maximum delay (fraction)      |
  1251.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1252.          | average delay (seconds)       | average delay (fraction)      |
  1253.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1254.          |  type = ADDR  |    length     |    reserved   | address type  |
  1255.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1256.          |                     network-layer address                    ...
  1257.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1258.          |  type = TSEL  |    length     |    reserved   | transport pro.|
  1259.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1260.          |                  transport-address (port number)              ...
  1261.          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1262.  
  1263.  
  1264.  
  1265.  
  1266. 5 Security Considerations
  1267.  
  1268.  
  1269. IP multicast provides no direct means for a sender to know all the receivers
  1270. of the data  sent.   RTP  options make  it easy  for all  participants in  a
  1271. conference to  identify themselves;  if deemed  important  for a  particular
  1272.  
  1273.  
  1274. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 22]
  1275.  
  1276.  
  1277. INTERNET-DRAFT                       RTP                       July 30, 1993
  1278.  
  1279. application, it  is the  responsibility of  the application  writer to  make
  1280. listening without identification difficult.   It  should be noted,  however,
  1281. that within  an internet,  privacy  of the  payload  can generally  only  be
  1282. assured by encryption.
  1283.  
  1284. The periodic transmission of session messages may make it possible to detect
  1285. denial-of-service attacks.  For many types of payload expected to be carried
  1286. in RTP packets, such as compressed audio  and video, the data is very  close
  1287. to white noise, making  statistics-based ciphertext-only attacks  difficult.
  1288. Without MICS/MICA options, it may even be difficult to detect  automatically
  1289. when the  code  has been  broken.    However,  the  session  information  is
  1290. more or less  constant and  predictable,  allowing known-plaintext  attacks.
  1291. Chosen-plaintext attacks appear to be difficult.
  1292.  
  1293. Since the timestamp in the RTP header is protected by the message  integrity
  1294. check options, some replay attacks can be detected if the receiver can bound
  1295. the maximum packet delay and clock offset of the sender.
  1296.  
  1297. Without authentication, the SDES fields  may be used to impersonate  another
  1298. site.    Impersonation  and  denial-of-service  attacks  can  be  made  more
  1299. difficult by providing  digital signatures for  all or parts  of a  message.
  1300. The MICA  or  MICS  and ENC  RTP  options  described in  Section  3  support
  1301. privacy within group  communications.   The issues of  key distribution  and
  1302. a certification  hierarchy  are outside  the  scope of  this  document.    A
  1303. direct mapping  of  all PEM  header  fields  into RTCP  option  types  would
  1304. be straightforward and  would allow reuse  of existing PEM  implementations.
  1305. However,  it  is  questionable  whether  loose  conference  control  is  the
  1306. appropriate mechanism for distributing key and certificate information.
  1307.  
  1308.  
  1309.  
  1310. 6 RTP over network and transport protocols
  1311.  
  1312.  
  1313. This section describes  issues specific  to carrying  RPDUs over  particular
  1314. network and transport protocols.
  1315.  
  1316.  
  1317. 6.1 Defaults
  1318.  
  1319.  
  1320. The following rules apply unless superseded by protocol-specific subsections
  1321. in this section.
  1322.  
  1323. If RTP protocol data units (RPDU) are carried over underlying protocols that
  1324. provide the abstraction  of a  continuous bit stream  rather than  messages,
  1325. each RPDU is  prefixed by a  32-bit framing field  containing the length  of
  1326. the RPDU measured in octets, not including the framing field itself.  If  an
  1327. RPDU traverses a path  over a mixture  of octet-stream and  message-oriented
  1328. protocols, each RTP-level bridge between these protocols is responsible  for
  1329. adding and removing the framing field.  A profile may determine that framing
  1330.  
  1331.  
  1332. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 23]
  1333.  
  1334.  
  1335. INTERNET-DRAFT                       RTP                       July 30, 1993
  1336.  
  1337. is to  be used  for protocols  that do  provide framing  in order  to  allow
  1338. carrying several RPDUs  in one  underlying protocol  data unit.    [Carrying
  1339. several RPDUs in one network or transport packet reduces header overhead and
  1340. may ease synchronization between different streams.]
  1341.  
  1342.  
  1343.  
  1344. 6.2 ST-II
  1345.  
  1346.  
  1347. The next protocol  field (``NextPCol'',  Section  4.2.2.10 in  RFC 1190)  is
  1348. used to distinguish  two encapsulations of  RTP over ST-II.  The first  uses
  1349. NextPCol value TBD and  directly places the RPDU  into the ST-II data  area.
  1350. If NextPCol value TBD is used, the RTP header is preceded by a 32-bit header
  1351. shown below.   The  byte count  determines the number  of bytes  in the  RTP
  1352. header and payload to be checksummed.  The 16-bit checksum uses the TCP  and
  1353. UDP checksum algorithm.
  1354.  
  1355.  
  1356.   0                   1                   2                   3
  1357.   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1358.  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1359.  | count of bytes to be checked  |           check sum           |
  1360.  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1361. ... RTP header ...
  1362.  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1363.  
  1364.  
  1365. A Implementation Notes
  1366.  
  1367.  
  1368. We describe aspects of the receiver  implementation in this section.   There
  1369. may be other implementation methods that are faster in particular  operating
  1370. environments or have other advantages.   These implementation notes are  for
  1371. informational purposes only.
  1372.  
  1373.  
  1374.  
  1375. A.1 Timestamp recovery
  1376.  
  1377.  
  1378. A fully specified NTP timestamp with 32 bits of full seconds and 16 bits  of
  1379. resolution for the fractional seconds can  be easily recovered from the  RTP
  1380. timestamp.  The following code stores timestamps as the 48-bit whole part of
  1381. a double precision floating point number:
  1382.  
  1383.  
  1384.  
  1385. #include <math.h>
  1386.  
  1387. typedef double CLOCK_t;
  1388. typedef unsigned long u_long;
  1389.  
  1390. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 24]
  1391.  
  1392.  
  1393. INTERNET-DRAFT                       RTP                       July 30, 1993
  1394.  
  1395. #define MAX32_bit 4294967296.
  1396. #define MAX31 0x7fffffff
  1397.  
  1398. CLOCK_t extend_timestamp(t, now)
  1399. u_long t;    /* in: timestamp, low-order 32 bits */
  1400. double now;  /* in: current local time */
  1401. {
  1402.   u_long high, low;   /* high and low order bits of 48-bit clock */
  1403.  
  1404.   low  = fmod(x, MAX_32bit);
  1405.   high = now / MAX_32bit;
  1406.  
  1407.   if      ((low > t) && (low - t > MAX31)) high++;
  1408.   else if ((low < t) && (t - low > MAX31)) high--;
  1409.   return high * MAX_32bit + t;
  1410. } /* extend_timestamp */
  1411.  
  1412.  
  1413.  
  1414.  
  1415. Using the full timestamp internally has the advantage that the remainder  of
  1416. the receiver code does not have to be concerned with modulo arithmetic.  The
  1417. current local time  does not  have to be  derived directly  from the  system
  1418. clock for every packet; a clock  based on samples, e.g., incremented by  the
  1419. nominal audio frame duration, is sufficient.
  1420.  
  1421.  
  1422. A.2 Detecting the Beginning of a Synchronization Unit
  1423.  
  1424.  
  1425. RTP packets contain a bit flag indicating the end of a synchronization unit.
  1426. The following code  fragment determines if  a packet is  the beginning of  a
  1427. synchronization unit:
  1428.  
  1429.  
  1430.  
  1431. CLOCK_t eos_t, t, now;
  1432. int flag;
  1433.  
  1434. struct {
  1435.   unsigned int ver:2;      /* version number */
  1436.   unsigned int flow:6;     /* flow */
  1437.   unsigned int o:1;        /* option present */
  1438.   unsigned int s:1;        /* sync bit */
  1439.   unsigned int format:6;   /* content type */
  1440.   u_short seq;             /* sequence number */
  1441.   u_long  ts;              /* time stamp */
  1442. } *h;
  1443.  
  1444. t = extend_timestamp(h->ts, now);
  1445.  
  1446. if (h->s) {
  1447.  
  1448. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 25]
  1449.  
  1450.  
  1451. INTERNET-DRAFT                       RTP                       July 30, 1993
  1452.  
  1453.   flag  = 1;
  1454.   eos_t = t;
  1455. }
  1456. else if (flag && t > eot_t) {
  1457.   flag = 0;
  1458.   /* handle beginning of synchronization unit */
  1459. }
  1460.  
  1461.  
  1462.  
  1463. (The structure definition has to be changed for little endian systems.)
  1464.  
  1465.  
  1466. A.3 Demultiplexing and Locating the Synchronization Source
  1467.  
  1468.  
  1469. For a combination of multicast  or destination unicast address,  destination
  1470. port, the flow ID determines  the channel.   For each channel, the  receiver
  1471. maintains a list of all  sources, content and synchronization sources  alike
  1472. in a table  or other suitable  datastructure.   Synchronization sources  are
  1473. stored with a content source value of zero.  When an RTP packet arrives, the
  1474. receiver determines its  network source address  and port (from  information
  1475. returned by the operating system), synchronization source (SSRC option)  and
  1476. content source(s)  (CSRC option).    To locate  the table  entry  containing
  1477. timing information,  mapping from  content  descriptor to  actual  encoding,
  1478. etc., the  receiver sets  the content  source to  zero and  locates a  table
  1479. entry based on the triple (network address and port, synchronization  source
  1480. identifier, 0).
  1481.  
  1482. The receiver identifies  the contributors to  the packet  (for example,  the
  1483. speaker who is  heard in  the packet) through  the list  of content  sources
  1484. carried in the CSRC option.   To locate the  table entry, it matches on  the
  1485. triple (network address and port, synchronization source identifier, content
  1486. source).
  1487.  
  1488. Note that  since  network  addresses  are  only  generated  locally  at  the
  1489. receiver, the receiver can choose whatever format seems most appropriate for
  1490. matching.  For example, a Berkeley Unix-based system may use struct sockaddr
  1491. data types if it expects network sources with non-IP addresses.
  1492.  
  1493.  
  1494. Acknowledgments
  1495.  
  1496.  
  1497. This draft  is based  on discussion  within the  IETF audio-video  transport
  1498. working group  chaired by  Stephen Casner.    The current  protocol has  its
  1499. origins in the Network Voice Protocol  and the Packet Video Protocol  (Danny
  1500. Cohen and Randy Cole) and the protocol implemented by the 'vat'  application
  1501. (Van Jacobson and  Steve McCanne).    Stuart Stubblebine  (ISI) helped  with
  1502. the security aspects of  RTP. Ron Frederic  (Xerox PARC) provided  extensive
  1503. editorial assistance.
  1504.  
  1505.  
  1506. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 26]
  1507.  
  1508.  
  1509. INTERNET-DRAFT                       RTP                       July 30, 1993
  1510.  
  1511. B Addresses of Authors
  1512.  
  1513.  
  1514. Stephen Casner
  1515. USC/Information Sciences Institute
  1516. 4676 Admiralty Way
  1517. Marina del Rey, CA 90292-6695
  1518. telephone:  +1 310 822 1511 (extension 153)
  1519. electronic mail:  casner@isi.edu
  1520.  
  1521.  
  1522.  
  1523. Henning Schulzrinne
  1524. AT&T Bell Laboratories
  1525. MH 2A244
  1526. 600 Mountain Avenue
  1527. Murray Hill, NJ 07974
  1528. telephone:  +1 908 582 2262
  1529. electronic mail:  hgs@research.att.com
  1530.  
  1531.  
  1532. References
  1533.  
  1534.  
  1535.  [1] J.  Postel, ``Internet protocol,''  Network Working  Group Request  for
  1536.      Comments RFC 791, Information Sciences Institute, Sept. 1981.
  1537.  
  1538.  [2] International  Standards   Organization,  ``ISO/IEC  DIS   10646-1:1993
  1539.      information technology -- universal multiple-octet coded  character set
  1540.      (UCS) -- part I: Architecture and basic multilingual plane,'' 1993.
  1541.  
  1542.  [3] The  Unicode Consortium,  T_h_e_ U_n_i_c_o_d_e_  S_t_a_n_d_a_r_d_.  New York,  New  York:
  1543.      Addison-Wesley, 1991.
  1544.  
  1545.  [4] D.  L. Mills,  ``Network time  protocol (version  3) --  specification,
  1546.      implementation  and  analysis,''  Network  Working  Group  Request  for
  1547.      Comments RFC 1305, University of Delaware, Mar. 1992.
  1548.  
  1549.  [5] D. Balenson, ``Privacy enhancement for internet electronic mail:   Part
  1550.      III:  Algorithms,  modes,  and  identifiers,''  Network  Working  Group
  1551.      Request for Comments RFC 1423, IETF, Feb. 1993.
  1552.  
  1553.  [6] V.  L. Voydock  and S.  T. Kent,  ``Security  mechanisms in  high-level
  1554.      network  protocols,'' A_C_M_  C_o_m_p_u_t_i_n_g_ S_u_r_v_e_y_s_,  vol. 15,  pp.  135--171,
  1555.      June 1983.
  1556.  
  1557.  [7] J. Kaliski,  Burton S., ``The  md2 message-digest algorithm,''  Network
  1558.      Working Group  Request for  Comments RFC 1319,  RSA Laboratories,  Apr.
  1559.      1992.
  1560.  
  1561.  [8] R. Rivest, ``The MD5 message-digest algorithm,'' Network  Working Group
  1562.  
  1563.  
  1564. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 27]
  1565.  
  1566.  
  1567. INTERNET-DRAFT                       RTP                       July 30, 1993
  1568.  
  1569.      Request for Comments RFC 1321, IETF, Apr. 1992.
  1570.  
  1571.  [9] P. Mockapetris,  ``Domain names --  concepts and facilities,''  Network
  1572.      Working Group Request for Comments RFC 1034, ISI, Nov. 1987.
  1573.  
  1574. [10] P. Mockapetris,  ``Domain names -- implementation and  specification,''
  1575.      Network Working Group Request for Comments RFC 1035, ISI, Nov. 1987.
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622. H. Schulzrinne/S. Casner             Expires 10/01/93              [Page 28]
  1623.